<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>定制Logo</title>
    <script src="https://openlayers.org/en/v4.5.0/build/ol.js" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 600px; height: 400px"></div>
<script>
    new ol.Map({
        controls: ol.control.defaults({
            attributionOptions: ({
                collapsible: false
            })
        }),
        // logo: false,     // 不显示logo
        // logo: 'face_monkey.png',     // 用一个图片 face_monkey.png 作为logo
        //没效果了
        logo: {src: 'logo.png', href: 'http://www.openstreetmap.org/'},    // 点击能跳转到对应页面
        layers: [
            new ol.layer.Tile({source: new ol.source.OSM()})
        ],
        view: new ol.View({
            center: [0, 0],
            zoom: 2
        }),
        target: 'map'
    });
</script>
</body>
</html>